home *** CD-ROM | disk | FTP | other *** search
- Path: news.u.washington.edu!lgy
- From: lgy@newton.phys.washington.edu (Laurence Yaffe)
- Newsgroups: gnu.g++.help,comp.lang.c++,comp.sys.sgi.apps,comp.sys.sgi.misc
- Subject: Re: SGI and C++
- Date: 19 Feb 1996 23:58:40 GMT
- Organization: University of Washington
- Message-ID: <4gb2rg$b99@nntp1.u.washington.edu>
- References: <4f609s$rho@fu-berlin.de> <4f6726$4ch@fido.asd.sgi.com> <4fahih$s13@fu-berlin.de> <4fbhs0$eo3@fido.asd.sgi.com> <4fl2nh$b66@sun20.ccd.bnl.gov> <4ga186$bk2@oban.cc.ic.ac.uk> <4gar2s$905@fido.asd.sgi.com>
- NNTP-Posting-Host: newton.phys.washington.edu
- X-Newsreader: NN version 6.5.0 #2 (NOV)
-
- shankar@mti.sgi.com (Shankar Unni) writes:
-
- >There *is* a known bug that I found recently (for which there won't be a fix
- >in Irix 6.2, since we found the problem too late to get into that release - it
- >will be fixed in a patch), where if you declare a template member function
- >in the following way, it's NOT inlined:
-
- > template <class T> class Foo {
- > ...
- > void memfunc(); /* no inline specification here */
- > ...
- > };
-
- > template <class T> inline Foo<T>::memfunc()
- > {
- > /* defined as inline, but compiler will fail to inline it */
- > }
-
-
- >The workaround for this problem is to stick the inline keyword before the
- >declaration of the member function inside the template class.
-
- Is there any similar problem with inlining non-member template functions?
- What is the easiest way to tell if a function actually did get inlined?
-
- ------------------------------------------------------------------------
- Laurence G. Yaffe lgy@phys.washington.edu
- University of Washington 1-206-543-3902 (fax: 1-206-543-9523)
-